#include <iostream>
#include <vector>
using namespace std;
class creditor{
public:
   ~creditor(){};
  void virtual takemoney()=0;
  
};
class lender{
    public:
  ~lender(){};
 void virtual borrow(creditor* cer)=0;
 void virtual notifyalltakemoney()=0;
};
class xiaozhang :public lender
{
    public:
  void  borrow(creditor* cer)override
  {
     
   allcreditor.push_back(cer);
  }
   void  notifyalltakemoney()override
   {
      for(auto e: allcreditor)
      {

      e->takemoney();


      }



   }


private:
  vector<creditor*> allcreditor;
  

};


class boss1 : public creditor
{ public:
    void  takemoney()override
    {

    cout<<"boss 1要钱"<<endl;

    }
 


};

class boss2 : public creditor
{ public:
    void  takemoney()override
    {

    cout<<"boss 2要钱"<<endl;

    }
 


};

class boss3: public creditor
{  public:
    void  takemoney()override
    {

    cout<<"boss 2要钱"<<endl;

    }
 


};

int main()
{

  boss1 t1;
  boss2 t2;
  boss3 t3;
  xiaozhang t4;
  t4.borrow(&t1);
  t4.borrow(&t2);
  t4.borrow(&t3);
  t4.notifyalltakemoney();




}